Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

app(app(append, nil), ys) → ys
app(app(append, app(app(cons, x), xs)), ys) → app(app(cons, x), app(app(append, xs), ys))
app(app(flatwith, f), app(leaf, x)) → app(app(cons, app(f, x)), nil)
app(app(flatwith, f), app(node, xs)) → app(app(flatwithsub, f), xs)
app(app(flatwithsub, f), nil) → nil
app(app(flatwithsub, f), app(app(cons, x), xs)) → app(app(append, app(app(flatwith, f), x)), app(app(flatwithsub, f), xs))

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

app(app(append, nil), ys) → ys
app(app(append, app(app(cons, x), xs)), ys) → app(app(cons, x), app(app(append, xs), ys))
app(app(flatwith, f), app(leaf, x)) → app(app(cons, app(f, x)), nil)
app(app(flatwith, f), app(node, xs)) → app(app(flatwithsub, f), xs)
app(app(flatwithsub, f), nil) → nil
app(app(flatwithsub, f), app(app(cons, x), xs)) → app(app(append, app(app(flatwith, f), x)), app(app(flatwithsub, f), xs))

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

APP(app(flatwith, f), app(node, xs)) → APP(app(flatwithsub, f), xs)
APP(app(append, app(app(cons, x), xs)), ys) → APP(append, xs)
APP(app(flatwith, f), app(leaf, x)) → APP(f, x)
APP(app(append, app(app(cons, x), xs)), ys) → APP(app(append, xs), ys)
APP(app(append, app(app(cons, x), xs)), ys) → APP(app(cons, x), app(app(append, xs), ys))
APP(app(flatwith, f), app(leaf, x)) → APP(app(cons, app(f, x)), nil)
APP(app(flatwith, f), app(leaf, x)) → APP(cons, app(f, x))
APP(app(flatwithsub, f), app(app(cons, x), xs)) → APP(app(flatwith, f), x)
APP(app(flatwithsub, f), app(app(cons, x), xs)) → APP(append, app(app(flatwith, f), x))
APP(app(flatwithsub, f), app(app(cons, x), xs)) → APP(app(flatwithsub, f), xs)
APP(app(flatwithsub, f), app(app(cons, x), xs)) → APP(app(append, app(app(flatwith, f), x)), app(app(flatwithsub, f), xs))
APP(app(flatwithsub, f), app(app(cons, x), xs)) → APP(flatwith, f)
APP(app(flatwith, f), app(node, xs)) → APP(flatwithsub, f)

The TRS R consists of the following rules:

app(app(append, nil), ys) → ys
app(app(append, app(app(cons, x), xs)), ys) → app(app(cons, x), app(app(append, xs), ys))
app(app(flatwith, f), app(leaf, x)) → app(app(cons, app(f, x)), nil)
app(app(flatwith, f), app(node, xs)) → app(app(flatwithsub, f), xs)
app(app(flatwithsub, f), nil) → nil
app(app(flatwithsub, f), app(app(cons, x), xs)) → app(app(append, app(app(flatwith, f), x)), app(app(flatwithsub, f), xs))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

APP(app(flatwith, f), app(node, xs)) → APP(app(flatwithsub, f), xs)
APP(app(append, app(app(cons, x), xs)), ys) → APP(append, xs)
APP(app(flatwith, f), app(leaf, x)) → APP(f, x)
APP(app(append, app(app(cons, x), xs)), ys) → APP(app(append, xs), ys)
APP(app(append, app(app(cons, x), xs)), ys) → APP(app(cons, x), app(app(append, xs), ys))
APP(app(flatwith, f), app(leaf, x)) → APP(app(cons, app(f, x)), nil)
APP(app(flatwith, f), app(leaf, x)) → APP(cons, app(f, x))
APP(app(flatwithsub, f), app(app(cons, x), xs)) → APP(app(flatwith, f), x)
APP(app(flatwithsub, f), app(app(cons, x), xs)) → APP(append, app(app(flatwith, f), x))
APP(app(flatwithsub, f), app(app(cons, x), xs)) → APP(app(flatwithsub, f), xs)
APP(app(flatwithsub, f), app(app(cons, x), xs)) → APP(app(append, app(app(flatwith, f), x)), app(app(flatwithsub, f), xs))
APP(app(flatwithsub, f), app(app(cons, x), xs)) → APP(flatwith, f)
APP(app(flatwith, f), app(node, xs)) → APP(flatwithsub, f)

The TRS R consists of the following rules:

app(app(append, nil), ys) → ys
app(app(append, app(app(cons, x), xs)), ys) → app(app(cons, x), app(app(append, xs), ys))
app(app(flatwith, f), app(leaf, x)) → app(app(cons, app(f, x)), nil)
app(app(flatwith, f), app(node, xs)) → app(app(flatwithsub, f), xs)
app(app(flatwithsub, f), nil) → nil
app(app(flatwithsub, f), app(app(cons, x), xs)) → app(app(append, app(app(flatwith, f), x)), app(app(flatwithsub, f), xs))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 2 SCCs with 8 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ QDPOrderProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

APP(app(append, app(app(cons, x), xs)), ys) → APP(app(append, xs), ys)

The TRS R consists of the following rules:

app(app(append, nil), ys) → ys
app(app(append, app(app(cons, x), xs)), ys) → app(app(cons, x), app(app(append, xs), ys))
app(app(flatwith, f), app(leaf, x)) → app(app(cons, app(f, x)), nil)
app(app(flatwith, f), app(node, xs)) → app(app(flatwithsub, f), xs)
app(app(flatwithsub, f), nil) → nil
app(app(flatwithsub, f), app(app(cons, x), xs)) → app(app(append, app(app(flatwith, f), x)), app(app(flatwithsub, f), xs))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


APP(app(append, app(app(cons, x), xs)), ys) → APP(app(append, xs), ys)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(APP(x1, x2)) = (3/2)x_1   
POL(append) = 0   
POL(cons) = 9/4   
POL(app(x1, x2)) = (1/2)x_1 + (9/4)x_2   
The value of delta used in the strict ordering is 243/128.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

app(app(append, nil), ys) → ys
app(app(append, app(app(cons, x), xs)), ys) → app(app(cons, x), app(app(append, xs), ys))
app(app(flatwith, f), app(leaf, x)) → app(app(cons, app(f, x)), nil)
app(app(flatwith, f), app(node, xs)) → app(app(flatwithsub, f), xs)
app(app(flatwithsub, f), nil) → nil
app(app(flatwithsub, f), app(app(cons, x), xs)) → app(app(append, app(app(flatwith, f), x)), app(app(flatwithsub, f), xs))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

APP(app(flatwith, f), app(node, xs)) → APP(app(flatwithsub, f), xs)
APP(app(flatwithsub, f), app(app(cons, x), xs)) → APP(app(flatwithsub, f), xs)
APP(app(flatwith, f), app(leaf, x)) → APP(f, x)
APP(app(flatwithsub, f), app(app(cons, x), xs)) → APP(app(flatwith, f), x)

The TRS R consists of the following rules:

app(app(append, nil), ys) → ys
app(app(append, app(app(cons, x), xs)), ys) → app(app(cons, x), app(app(append, xs), ys))
app(app(flatwith, f), app(leaf, x)) → app(app(cons, app(f, x)), nil)
app(app(flatwith, f), app(node, xs)) → app(app(flatwithsub, f), xs)
app(app(flatwithsub, f), nil) → nil
app(app(flatwithsub, f), app(app(cons, x), xs)) → app(app(append, app(app(flatwith, f), x)), app(app(flatwithsub, f), xs))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


APP(app(flatwith, f), app(leaf, x)) → APP(f, x)
The remaining pairs can at least be oriented weakly.

APP(app(flatwith, f), app(node, xs)) → APP(app(flatwithsub, f), xs)
APP(app(flatwithsub, f), app(app(cons, x), xs)) → APP(app(flatwithsub, f), xs)
APP(app(flatwithsub, f), app(app(cons, x), xs)) → APP(app(flatwith, f), x)
Used ordering: Polynomial interpretation [25,35]:

POL(APP(x1, x2)) = x_1   
POL(flatwithsub) = 7/2   
POL(cons) = 0   
POL(node) = 1/4   
POL(leaf) = 11/4   
POL(app(x1, x2)) = 2 + (4)x_2   
POL(flatwith) = 0   
The value of delta used in the strict ordering is 2.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

APP(app(flatwith, f), app(node, xs)) → APP(app(flatwithsub, f), xs)
APP(app(flatwithsub, f), app(app(cons, x), xs)) → APP(app(flatwithsub, f), xs)
APP(app(flatwithsub, f), app(app(cons, x), xs)) → APP(app(flatwith, f), x)

The TRS R consists of the following rules:

app(app(append, nil), ys) → ys
app(app(append, app(app(cons, x), xs)), ys) → app(app(cons, x), app(app(append, xs), ys))
app(app(flatwith, f), app(leaf, x)) → app(app(cons, app(f, x)), nil)
app(app(flatwith, f), app(node, xs)) → app(app(flatwithsub, f), xs)
app(app(flatwithsub, f), nil) → nil
app(app(flatwithsub, f), app(app(cons, x), xs)) → app(app(append, app(app(flatwith, f), x)), app(app(flatwithsub, f), xs))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


APP(app(flatwith, f), app(node, xs)) → APP(app(flatwithsub, f), xs)
APP(app(flatwithsub, f), app(app(cons, x), xs)) → APP(app(flatwithsub, f), xs)
APP(app(flatwithsub, f), app(app(cons, x), xs)) → APP(app(flatwith, f), x)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25,35]:

POL(APP(x1, x2)) = (4)x_2   
POL(flatwithsub) = 3/2   
POL(cons) = 1/4   
POL(node) = 1   
POL(app(x1, x2)) = 3/2 + (1/2)x_1 + (4)x_2   
POL(flatwith) = 5/2   
The value of delta used in the strict ordering is 8.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
              ↳ QDP
                ↳ QDPOrderProof
QDP
                    ↳ PisEmptyProof

Q DP problem:
P is empty.
The TRS R consists of the following rules:

app(app(append, nil), ys) → ys
app(app(append, app(app(cons, x), xs)), ys) → app(app(cons, x), app(app(append, xs), ys))
app(app(flatwith, f), app(leaf, x)) → app(app(cons, app(f, x)), nil)
app(app(flatwith, f), app(node, xs)) → app(app(flatwithsub, f), xs)
app(app(flatwithsub, f), nil) → nil
app(app(flatwithsub, f), app(app(cons, x), xs)) → app(app(append, app(app(flatwith, f), x)), app(app(flatwithsub, f), xs))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.